<?php

require_once dirname(__FILE__).'/../lib/chequeGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/chequeGeneratorHelper.class.php';

/**
 * cheque actions.
 *
 * @package    xists
 * @subpackage cheque
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $
 */
class chequeActions extends autoChequeActions
{
  public function executeBatchCleared(sfWebRequest $request)
  {
    $ids = $request->getParameter('ids');
 
    $xistsCheques = XistsUserChequePeer::retrieveByPks($ids);
 
    foreach ($xistsCheques as $xistsCheque) {
      $xistsCheque->cleared(1);
    }
 
    $this->getUser()->setFlash('notice', 'The selected user chaques have been cleared successfully.');
    
    $this->redirect('@xists_user_cheque');
 
  }
}
